cmake_minimum_required(VERSION 3.0)

project(FIBER)

set(CMAKE_BUILD_TYPE Debug)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_COMPILER g++-13)

set(fileList 
    fiber.cpp
    scheduler.cpp
    backtrace.cpp
    )

set(testFiberList  test_fiber.cpp ${fileList})
set(testScheduler test_scheduler.cpp ${fileList})

set(LIB pthread)

add_executable(fiber ${testFiberList})
add_executable(scheduler ${testScheduler})

target_link_libraries(fiber ${LIB})
target_link_libraries(scheduler ${LIB})